<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta('icon');

		echo $this->Html->css('admin/bootstrap');
		echo $this->Html->css('admin/jquery-ui-1.8.16.custom');
		echo $this->Html->css('admin/jquery.jqplot');
		echo $this->Html->css('admin/prettify');
		echo $this->Html->css('admin/elfinder.min');
		echo $this->Html->css('admin/elfinder.theme');
		echo $this->Html->css('admin/fullcalendar');
		echo $this->Html->css('admin/styles');
		echo $this->Html->css('admin/bootstrap-responsive');
		echo $this->Html->css('admin/icons-sprite');
		echo $this->Html->css('../js/admin/plupupload/jquery.plupload.queue/css/jquery.plupload.queue');
		echo $this->Html->css('admin/themes');

		echo $this->Html->script('jquery-1.8.2');
		echo $this->Html->script('nav');

		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('js');
	?>
	<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="<?php echo CSS_URL?>admin/ie/ie7.css" />
	<![endif]-->
	<!--[if IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo CSS_URL?>admin/ie/ie8.css" />
	<![endif]-->
	<!--[if IE 9]>
	<link rel="stylesheet" type="text/css" href="<?php echo CSS_URL?>admin/ie/ie9.css" />
	<![endif]-->
</head>

<body>
<div class="navbar navbar-fixed-top">
  <div class="navbar-inner top-nav">
    <div class="container-fluid">
      <div class="branding">
        <div class="logo"> <a href="/admin"><img src="/img/admin/logo.png" width="168" height="40" alt="Logo"></a> </div>
      </div>

      <ul class="nav pull-right">

        <li class="dropdown">
        	<a data-toggle="dropdown" class="dropdown-toggle" href="#">Administrator<span></span><i class="white-icons admin_user"></i><b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="#"><i class="icon-file"></i>View Profile</a></li>
            <li><a href="#"><i class="icon-pencil"></i> Edit Profile</a></li>
            <li class="divider"></li>
            <li><a href="/admin/users/logout"><i class="icon-off"></i><strong> Logout</strong></a></li>
          </ul>
        </li>

      </ul>

      <ul class="nav">

        <li class="dropdown">
        	<a data-toggle="dropdown" class="dropdown-toggle" href="#">
        		<i class="white-icons home_2"></i>&nbsp<?php echo $current_company['name']?><b class="caret"></b>
        	</a>

			<ul class="dropdown-menu">
			<?php if(!empty($company_list)) foreach($company_list as $k => $v):?>
				<li <?php echo $current_company['id'] == $k ? 'class="active"' : ''; ?>>
					<a href="/admin/companies/changeCompany/<?php echo $k;?>"><?php echo $v;?></a>
				</li>
			<?php endforeach;?>
  			</ul>
        </li>

      </ul>

	 <!-- Theme Setting -->
	 <button data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar" type="button"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
      <div class="nav-collapse collapse">
        <ul class="nav">
          <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="nav-icon cog_3"></i> Themes Settings<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li class="nav-header hidden-phone hidden-tablet">Sidebar</li>

              <li class="theme-settings clearfix hidden-phone hidden-tablet">
                <div class="btn-group">
                  <button id="sidebar-on" disabled="disabled" class="btn btn-success">On</button>
                  <button id="sidebar-off" class="btn btn-inverse">Off</button>
                </div>
              </li>

              <li class=" divider"></li>
              <li class="nav-header hidden-phone hidden-tablet">Sidebar Placement</li>
              <li class="theme-settings clearfix hidden-phone hidden-tablet">
                <div class="btn-group">
                  <button disabled="disabled" id="left-sidebar" class="btn btn-inverse">Left</button>
                  <button id="right-sidebar" class="btn btn-info">Right</button>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>



    </div>
  </div>
</div>

<!-- Left menu -->
<div id="sidebar">
  <ul class="side-nav accordion_mnu collapsible">
    <li <?php echo $menu === 'homes' ? 'class="active"' : '';?>>
    	<a href="/admin"><span class="white-icons computer_imac"></span>Dashboard</a> <!-- blocks_images -->
    </li>

    <li <?php echo $menu === 'companies' ? 'class="active"' : '';?>>
    	<a href="/admin/companies"><span class="white-icons home_2"></span>Manager Store</a>
    </li>

    <li <?php echo $menu === 'categories' ? 'class="active"' : '';?>>
    	<a href="/admin/categories"><span class="white-icons list"></span>Manager Category</a> <!--documents-->
    </li>

    <li <?php echo $menu === 'products' ? 'class="active"' : '';?>>
    	<a href="/admin/products"><span class="white-icons lemonade_stand"></span>Manager Product</a>
    </li>

    <li <?php echo $menu === 'bills' ? 'class="active"' : '';?>>
    	<a href="/admin/bills"><span class="white-icons create_write"></span>Manager Bills</a>
    </li>

    <li <?php echo $menu === 'users' ? 'class="active"' : '';?>>
    	<a href="/admin/users"><span class="white-icons user"></span>Manager Member</a>
    </li>

    <li><a href="#"><span class="white-icons cup"></span> Features</a>
      <ul class="acitem">
        <li><a href="typography.html"><span class="sidenav-icon"><span class="sidenav-link-color"></span></span>Typography</a></li>
        <li><a href="widgets.html"><span class="sidenav-icon"><span class="sidenav-link-color"></span></span>Widgets</a></li>
        <li><a href="grid.html"><span class="sidenav-icon"><span class="sidenav-link-color"></span></span>Grid</a></li>
        <li><a href="button-icons.html"><span class="sidenav-icon"><span class="sidenav-link-color"></span></span>Buttons &amp; Icons</a></li>
        <li><a href="ui-elements.html"><span class="sidenav-icon"><span class="sidenav-link-color"></span></span>All UI Elements</a></li>
      </ul>
    </li>
  </ul>

</div>
<!-- End Left menu -->
<?php echo $this->element('alert'); ?>
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/js/admin/component/template.js"></script>
<script type="text/javascript" src="/js/handlebars.js"></script>
<script src="/js/Alert.js"></script>

<div id="main-content">
	<div class="container-fluid">

		<?php echo $this->fetch('content'); ?>
	</div>
</div>


<!-- javascript
================================================== -->



<script>

	/**
	 * Confirm delete, lock, unlock
	 **/
	function confirmChangeStatus(obj, text, label, _confirm)
	{
		if( !_confirm ) {
			alertMSG.showDialogConfirm( text, label, 'Confirmed', function(){
				window.location.href = obj.attr('href');
			});
			return false;
		}
	}

</script>

<!-- javascript template
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/js/admin/jquery.js"></script>
<script src="/js/admin/jquery-ui-1.8.16.custom.min.js"></script>
<script src="/js/admin/jquery.ui.touch-punch.js"></script>
<script src="/js/admin/bootstrap.js"></script>
<script src="/js/admin/prettify.js"></script>
<script src="/js/admin/jquery.sparkline.min.js"></script>
<script src="/js/admin/jquery.nicescroll.min.js"></script>
<script src="/js/admin/accordion.jquery.js"></script>
<script src="/js/admin/smart-wizard.jquery.js"></script>
<script src="/js/admin/vaidation.jquery.js"></script>
<script src="/js/admin/jquery-dynamic-form.js"></script>
<script src="/js/admin/fullcalendar.js"></script>
<script src="/js/admin/raty.jquery.js"></script>
<script src="/js/admin/jquery.noty.js"></script>
<script src="/js/admin/jquery.cleditor.min.js"></script>
<script src="/js/admin/data-table.jquery.js"></script>
<script src="/js/admin/TableTools.min.js"></script>
<script src="/js/admin/ColVis.min.js"></script>
<script src="/js/admin/plupload.full.js"></script>
<script src="/js/admin/elfinder/elfinder.min.js"></script>
<script src="/js/admin/chosen.jquery.js"></script>
<script src="/js/admin/uniform.jquery.js"></script>
<script src="/js/admin/jquery.tagsinput.js"></script>
<script src="/js/admin/jquery.colorbox-min.js"></script>
<script src="/js/admin/check-all.jquery.js"></script>
<script src="/js/admin/inputmask.jquery.js"></script>
<!--<script src="http://bp.yahooapis.com/2.4.21/browserplus-min.js"></script> -->
<script src="/js/admin/plupupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
<script src="/js/admin/excanvas.min.js"></script>
<!-- <script src="/js/admin/jquery.jqplot.min.js"></script> -->
<script src="/js/admin/custom-script.js"></script>

<!-- html5.js for IE less than 9 -->
<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!--
<script src="/js/admin/respond.min.js"></script>
<script src="/js/admin/ios-orientationchange-fix.js"></script>
-->


</body>
</html>